import request from '../utils/request'

export const userLogin = ({username,password})=>{ //登录
  return request.post('/login',{username,password})
}

export const userReg = (userObj)=>{ //注册、账号分配
  return request.post('/users',userObj)
}


export const roleAdd = (roleObj)=>{ //新增角色
  return request.post('/classes/CakeRole',roleObj)
}

export const roleGet = ()=>{ //角色列表
  return request.get('/classes/CakeRole')
}